package com.education.service.system;

import com.education.mapper.system.SystemRoleMenuMapper;
import com.education.service.BaseService;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author 余一
 * @Description
 * @date 2021/7/10 21:41
 */
@Service
public class SystemRoleMenuService extends BaseService<SystemRoleMenuMapper> {
    public List<Map> findMenuListByRoleIds(Map params){
        return mapper.findMenuListByRoleIds(params);
    }

    public int batchDeleteByIds(List<Integer> ids) {
        return mapper.batchDeleteByIds(ids);
    }

    public int deleteByRoleId(Integer roleId) {
        return mapper.deleteByRoleId(roleId);
    }

    public int batchSave(List<Map> roleMenus) {
        Map params = new HashMap();
        params.put("list",roleMenus);
        return mapper.batchSave(params);
    }
}
